package com.fuja.swf.ui;
import waba.ui.*;
public class UIUtil {
	public static void showMsg(String title,String msg){
		Window window = new MessageBox(title,msg);
		window.popupBlockingModal();
		window.unpop();
	}
	public static int showMsg(String title,String msg,String [] opts){
		MessageBox window = new MessageBox(title,msg,opts);
		window.popupBlockingModal();
		window.unpop();
		return window.getPressedButtonIndex();
	}
	public static void swap(Window c){
		MainWindow mw = MainWindow.getMainWindow(); 
	
		//c.popupBlockingModal();		
		c.setRect(mw.getRect());
		mw.swap(c);
	}
	public static Window getActual(){
		int i = 0;
		while (!(MainWindow.getMainWindow().getChildren()[i] instanceof Window))
			i++;
		return (Window) MainWindow.getMainWindow().getChildren()[i];
	}

}
